package com.zp.base.service.printPdfTemplate;

import com.zp.base.entity.printPdfTemplate.bo.PrintPdfTemplateBo;
import com.zp.base.entity.printPdfTemplate.vo.PrintPdfTemplateVo;
import com.zp.common.myBatis.core.page.PageQuery;
import com.zp.common.myBatis.core.page.TableDataInfo;
import com.zp.common.oss.config.uploadMessage;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.List;

/**
 * pdf打印模板字典Service接口
 *
 * @author zhang peng
 * @ date 2023-09-18
 */
public interface IPrintPdfTemplateService {

    /**
     * 查询pdf打印模板字典
     */
    PrintPdfTemplateVo queryById (String id);

    /**
     * 查询pdf打印模板字典列表(分页)
     */
    TableDataInfo<PrintPdfTemplateVo> queryPageList (PrintPdfTemplateBo bo, PageQuery pageQuery);

    /**
     * 查询pdf打印模板字典列表(不分页)
     */
    List<PrintPdfTemplateVo> queryList (PrintPdfTemplateBo bo);

    /**
     * 修改pdf打印模板字典
     */
    Boolean insertByBo (PrintPdfTemplateBo bo);

    /**
     * 修改pdf打印模板字典
     */
    Boolean updateByBo (PrintPdfTemplateBo bo);

    /**
     * 校验并批量删除pdf打印模板字典信息
     */
    Boolean deleteWithValidByIds (Collection<String> ids, Boolean isValid);

    /**
     * @return
     * @Author zhangpeng
     * @Description //TODO 上传pdf到服务器
     * @ date 14:26 2023/9/21
     **/
    uploadMessage uploadPdfFile (String baseDir, MultipartFile file, String templateName, String templateCode, String templateType, String orgId, String filePath);

    /**
     * iReport打印模板下载
     *
     * @param id
     * @param response
     * @param request
     */
    void downloadFile (String id, HttpServletResponse response, HttpServletRequest request);

    void printTest (String id, HttpServletRequest request, HttpServletResponse response);

}
